package com.example.lotterysystem.service;

import com.example.lotterysystem.controller.param.CreatePrizeParam;
import com.example.lotterysystem.controller.param.PageParam;
import com.example.lotterysystem.controller.param.UpdatePrizeParam;
import com.example.lotterysystem.dao.dataobject.PrizeDO;
import com.example.lotterysystem.service.dto.PageListDTO;
import com.example.lotterysystem.service.dto.PrizeDTO;
import org.springframework.web.multipart.MultipartFile;

public interface PrizeService {

    /**
     * 创建单个奖品
     * @param param 奖品属性
     * @param picFile 奖品图片
     * @return 奖品id
     */
    Long createPrize(CreatePrizeParam param, MultipartFile picFile);

    /**
     * 翻页查询列表
     * @param param
     * @param prizeName prizeName为空时查询所有奖品, 否则模糊查询
     * @return
     */
    PageListDTO<PrizeDTO> findPrizeList(PageParam param, String prizeName);

    Boolean deletePrize(Long prizeId);

    PrizeDO getPrizeInfo(Long prizeId);

    Boolean updatePrize(UpdatePrizeParam param, MultipartFile picFile);
}
